#ifndef _DB_H_
#define _DB_H_
#include "Utility.h"

// define some func here
// Author try

int Create(const char* tableName, col* colArr, int count);
int insertNormal(const char* tableName, colValue* valueArr);
int insertChaos(const char* tableName, colValue* valueArr, char** colNames);
int drop(const char* tableName);
int Where (char **tables, int numofTable, whereCond *wherec, int numofCond, whereRet **ret);
//int selectByTable(char* fileName, int pageid, int offset);
//int selectByFile(int fileid, int pageid, int offset);
//int selectCol(char* targetTablen, whereRet* ret, char* colNamesA[], char* colNamesB[], int numA, int numB);
//int deleteByTable(char* tableName, int pageid, int offset);
//int deleteByFile(int fileid, int pageid, int offset);
int selectColumn(whereRet* ret, char** colNames, char** tableNames, int numA, char** tables, int numB);
int Delete(whereRet* ret);
//int updateByTable(char* filename, int pageid, int offset, char* colName, colValue* value);
//int updateByFile(int fileid, int pageid, int offset, char* colName, colValue* value);
int update(char* targetTable, whereRet* ret, char* colNames[], char* newValue[], int colNum);
#endif
